﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using WmsApp.Lookup;
using WmsApp.WindowControl;

namespace WmsApp.WmsService
{
    public partial class InvoiceBill : IWcfState
    {
        public static InvoiceBill CreateInvoiceBill()
        {
            var r = new InvoiceBill
            {
                InvoiceNo = "",
                InvoiceTag = Guid.NewGuid().ToString(),
                AmountTax = 0,
                InStoreBillAmount = 0,
                ProviderName = "",
                ProviderCode = "",
                ExtVarChar1 = "",
                ExtVarChar2 = "",
                ExtVarChar3 = "",
                ExtVarChar4 = "",
                ExtNumeric1 = 0,
                ExtNumeric2 = 0,
                ExtNumeric3 = 0,
                ExtNumeric4 = 0,
                WcfEntityState = System.Data.EntityState.Added
            };
            r.BindPropertyChanged();
            return r;
        }
        
        /// <summary>
        /// 本次分摊金额，提供给分摊界面使用
        /// </summary>
        public decimal PayAmountTax { get; set; }

        public void BindPropertyChanged()
        {
            this.PropertyChanged += WmsApp.EntityControl.PropertyChangedHandler.EntityObjectPropertyChanged;
        }
    }
}
